Optimal. Leaf size=129 \[ \frac {a \, _2F_1\left (1,\frac {1+p}{2};\frac {3+p}{2};-\tan ^2(e+f x)\right ) (g \tan (e+f x))^{1+p}}{f g (1+p)}+\frac {b \cos ^2(e+f x)^{\frac {1+p}{2}} \, _2F_1\left (\frac {1+p}{2},\frac {2+p}{2};\frac {4+p}{2};\sin ^2(e+f x)\right ) \sin (e+f x) (g \tan (e+f x))^{1+p}}{f g (2+p)} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.10, antiderivative size = 129, normalized size of antiderivative = 1.00, number of steps
used = 6, number of rules used = 5, integrand size = 21, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.238, Rules used = {2801, 3557,
371, 2682, 2657} \begin {gather*} \frac {a (g \tan (e+f x))^{p+1} \, _2F_1\left (1,\frac {p+1}{2};\frac {p+3}{2};-\tan ^2(e+f x)\right )}{f g (p+1)}+\frac {b \sin (e+f x) \cos ^2(e+f x)^{\frac {p+1}{2}} (g \tan (e+f x))^{p+1} \, _2F_1\left (\frac {p+1}{2},\frac {p+2}{2};\frac {p+4}{2};\sin ^2(e+f x)\right )}{f g (p+2)} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 371
Rule 2657
Rule 2682
Rule 2801
Rule 3557
Rubi steps
\begin {align*} \int (a+b \sin (e+f x)) (g \tan (e+f x))^p \, dx &=\int \left (a (g \tan (e+f x))^p+b \sin (e+f x) (g \tan (e+f x))^p\right ) \, dx\\ &=a \int (g \tan (e+f x))^p \, dx+b \int \sin (e+f x) (g \tan (e+f x))^p \, dx\\ &=\frac {(a g) \text {Subst}\left (\int \frac {x^p}{g^2+x^2} \, dx,x,g \tan (e+f x)\right )}{f}+\frac {\left (b \cos ^{1+p}(e+f x) \sin ^{-1-p}(e+f x) (g \tan (e+f x))^{1+p}\right ) \int \cos ^{-p}(e+f x) \sin ^{1+p}(e+f x) \, dx}{g}\\ &=\frac {a \, _2F_1\left (1,\frac {1+p}{2};\frac {3+p}{2};-\tan ^2(e+f x)\right ) (g \tan (e+f x))^{1+p}}{f g (1+p)}+\frac {b \cos ^2(e+f x)^{\frac {1+p}{2}} \, _2F_1\left (\frac {1+p}{2},\frac {2+p}{2};\frac {4+p}{2};\sin ^2(e+f x)\right ) \sin (e+f x) (g \tan (e+f x))^{1+p}}{f g (2+p)}\\ \end {align*}
________________________________________________________________________________________
Mathematica [C] Result contains higher order function than in optimal. Order 6 vs. order 5 in
optimal.
time = 4.95, size = 849, normalized size = 6.58 \begin {gather*} \frac {2 (a+b \sin (e+f x)) \tan \left (\frac {1}{2} (e+f x)\right ) \left (a (2+p) F_1\left (\frac {1+p}{2};p,1;\frac {3+p}{2};\tan ^2\left (\frac {1}{2} (e+f x)\right ),-\tan ^2\left (\frac {1}{2} (e+f x)\right )\right )+2 b (1+p) F_1\left (1+\frac {p}{2};p,2;2+\frac {p}{2};\tan ^2\left (\frac {1}{2} (e+f x)\right ),-\tan ^2\left (\frac {1}{2} (e+f x)\right )\right ) \tan \left (\frac {1}{2} (e+f x)\right )\right ) (g \tan (e+f x))^p}{f \left (\sec ^2\left (\frac {1}{2} (e+f x)\right ) \left (a (2+p) F_1\left (\frac {1+p}{2};p,1;\frac {3+p}{2};\tan ^2\left (\frac {1}{2} (e+f x)\right ),-\tan ^2\left (\frac {1}{2} (e+f x)\right )\right )+2 b (1+p) F_1\left (1+\frac {p}{2};p,2;2+\frac {p}{2};\tan ^2\left (\frac {1}{2} (e+f x)\right ),-\tan ^2\left (\frac {1}{2} (e+f x)\right )\right ) \tan \left (\frac {1}{2} (e+f x)\right )\right )-16 p \cos \left (\frac {1}{2} (e+f x)\right ) \csc ^3(e+f x) \sec (e+f x) \sin ^5\left (\frac {1}{2} (e+f x)\right ) \left (a (2+p) F_1\left (\frac {1+p}{2};p,1;\frac {3+p}{2};\tan ^2\left (\frac {1}{2} (e+f x)\right ),-\tan ^2\left (\frac {1}{2} (e+f x)\right )\right )+2 b (1+p) F_1\left (1+\frac {p}{2};p,2;2+\frac {p}{2};\tan ^2\left (\frac {1}{2} (e+f x)\right ),-\tan ^2\left (\frac {1}{2} (e+f x)\right )\right ) \tan \left (\frac {1}{2} (e+f x)\right )\right )+2 p \csc (e+f x) \sec (e+f x) \tan \left (\frac {1}{2} (e+f x)\right ) \left (a (2+p) F_1\left (\frac {1+p}{2};p,1;\frac {3+p}{2};\tan ^2\left (\frac {1}{2} (e+f x)\right ),-\tan ^2\left (\frac {1}{2} (e+f x)\right )\right )+2 b (1+p) F_1\left (1+\frac {p}{2};p,2;2+\frac {p}{2};\tan ^2\left (\frac {1}{2} (e+f x)\right ),-\tan ^2\left (\frac {1}{2} (e+f x)\right )\right ) \tan \left (\frac {1}{2} (e+f x)\right )\right )+2 (1+p) \sec ^2\left (\frac {1}{2} (e+f x)\right ) \tan \left (\frac {1}{2} (e+f x)\right ) \left (b F_1\left (1+\frac {p}{2};p,2;2+\frac {p}{2};\tan ^2\left (\frac {1}{2} (e+f x)\right ),-\tan ^2\left (\frac {1}{2} (e+f x)\right )\right )+\frac {a (2+p) \left (-F_1\left (\frac {3+p}{2};p,2;\frac {5+p}{2};\tan ^2\left (\frac {1}{2} (e+f x)\right ),-\tan ^2\left (\frac {1}{2} (e+f x)\right )\right )+p F_1\left (\frac {3+p}{2};1+p,1;\frac {5+p}{2};\tan ^2\left (\frac {1}{2} (e+f x)\right ),-\tan ^2\left (\frac {1}{2} (e+f x)\right )\right )\right ) \tan \left (\frac {1}{2} (e+f x)\right )}{3+p}+\frac {2 b (2+p) \left (-2 F_1\left (2+\frac {p}{2};p,3;3+\frac {p}{2};\tan ^2\left (\frac {1}{2} (e+f x)\right ),-\tan ^2\left (\frac {1}{2} (e+f x)\right )\right )+p F_1\left (2+\frac {p}{2};1+p,2;3+\frac {p}{2};\tan ^2\left (\frac {1}{2} (e+f x)\right ),-\tan ^2\left (\frac {1}{2} (e+f x)\right )\right )\right ) \tan ^2\left (\frac {1}{2} (e+f x)\right )}{4+p}\right )\right )} \end {gather*}
Warning: Unable to verify antiderivative.
[In]
[Out]
________________________________________________________________________________________
Maple [F]
time = 0.23, size = 0, normalized size = 0.00 \[\int \left (a +b \sin \left (f x +e \right )\right ) \left (g \tan \left (f x +e \right )\right )^{p}\, dx\]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \left (g \tan {\left (e + f x \right )}\right )^{p} \left (a + b \sin {\left (e + f x \right )}\right )\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \int {\left (g\,\mathrm {tan}\left (e+f\,x\right )\right )}^p\,\left (a+b\,\sin \left (e+f\,x\right )\right ) \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________